export function getProvinceWithCity(address) {
  const provinceList = []
  address.forEach(item => {
    const province = { label: item.provinceName, value: item.provinceId, children: [] }
    item.cityList.forEach(city => {
      province.children.push({ label: city.cityName, value: city.cityId })
    })
    provinceList.push(province)
  })
  return provinceList
}

export function getCityWithArea(address) {
  const cityList = []
  address.forEach(item => {
    const city = { label: item.cityName, value: item.cityId, children: [] }
    item.area.forEach(area => {
      city.children.push({ label: area.areaName, value: area.areaId })
    })
    cityList.push(city)
  })
  return cityList
}
